class Solution:
    def translateNum(self, num: int) -> int:
        s = str(num)
        ans = [1]*len(s)

        for i in range(1, len(s)):
            if (int(s[i - 1] + s[i])) < 26 and (int(s[i - 1] + s[i]))>9:
                ans[i] =ans[i-1]+ans[i-2]
            else:
                ans[i]=ans[i-1]
                print(ans)
        return ans[-1]


if __name__ == '__main__':
    s = Solution()
    ans = s.translateNum(12258)
    print(ans)
